|
|
|
|
|
|
|
curidx = curidx + 1
PointArray(curidx).X = Width
PointArray(curidx).Y = Height - curidx * Increment
curidx = curidx + 1
PointArray(curidx).X = 0
PointArray(curidx).Y = curidx * Increment
Loop While curidx * Increment < Height
End Sub
Private Sub Form_Paint()
Dim points() As POINTAPI
LoadPointArray Width, Height, 5, points()
Call Polygon(hWnd, points(0), UBound(points) + 1)
End Sub
Private Sub Form_Resize()
Refresh
End Sub |
|
|
|
|
|
|
|
|
Figure P3-1:
Correct display for the Poly program |
|
|
|
|
|
|
|
|
The code shown above displays an empty form. |
|
|
|
|
|
|
|
|
Can you make it work? It may be trickier than it looks. |
|
|
|
|
|